package ogs.lib.mina.core.filterchain
{
	import ogs.lib.mina.core.service.IoConnector;

	public interface IoFilterChain
	{
		function getConnector():IoConnector;
		
		function getFilterChainNode(filter:IoFilter):IoFilterChainNode;
		
		function getFilterChainNodeByName(name:String):IoFilterChainNode;
		
		function getFilterChainNodeByType(filterType:Class):IoFilterChainNode;
		
		
		function getFilterByName(name:String):IoFilter;
		
		function getFilterByType(filterType:Class):IoFilter;
		
		
		function getNextFilter(filter:IoFilter):NextFilter;
		
		function getNextFilterByName(name:String):NextFilter;
		
		function getNextFilterByType(filterType:Class):NextFilter;
		
		
		function getAll():Array; //List<Entry>;
		
		function getAllReversed():Array; //List<Entry>;
		
		
		function contains(filter:IoFilter):Boolean;
		
		function containsByName(name:String):Boolean;
		
		function containsByType(filterType:Class):Boolean;
		
		
		function addFirst(name:String, filter:IoFilter):void;
		
		function addLast(name:String, filter:IoFilter):void;
		
		function addBefore(baseName:String, name:String, filter:IoFilter):void;
		
		function addAfter(baseName:String, name:String, filter:IoFilter):void;
		
		
		function replace(oldFilter:IoFilter, newFilter:IoFilter):void;
		
		function replaceByName(name:String, newFilter:IoFilter):IoFilter;
		
		function replaceByType(oldFilterType:Class, newFilter:IoFilter):IoFilter;
		
		
		function remove(filter:IoFilter):void;
		
		function removeByName(name:String):IoFilter;
		
		function removeByType(filterType:Class):IoFilter;
		
		function clear():void;
		
		
		function fireSessionOpened():void;
		
		function fireSessionClosed():void;
		
		function fireMessageReceived(message:Object):void;
		
		function fireExceptionCaught(cause:Error):void;
		
		function fireFilterWrite(message:Object):void;
		
		function fireFilterClose():void;
		

	}
}